← Index
NYTProf Performance Profile   
For rbm/rbm
  Run on Wed Feb 12 03:38:15 2020
Reported on Wed Feb 12 04:56:36 2020

Filename(eval 14)[rbm/lib/RBM.pm:39]
StatementsExecuted 65 statements in 2.63ms
Eval Invoked At/root/tor-browser-build/rbm/lib/RBM.pm line 39
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1511741µs875msRBM::::__ANON__[:16]RBM::__ANON__[:16]
1511466µs832msRBM::::__ANON__[:10]RBM::__ANON__[:10]
11114µs55µsRBM::::BEGIN@2.7RBM::BEGIN@2.7
11110µs33µsRBM::::BEGIN@28RBM::BEGIN@28
0000s0sRBM::::__ANON__[:23]RBM::__ANON__[:23]
0000s0sRBM::::__ANON__[:41]RBM::__ANON__[:41]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# This part of the file contains options written in perl
22905µs295µs
# spent 55µs (14+41) within RBM::BEGIN@2.7 which was called: # once (14µs+41µs) by RBM::load_config_file at line 2
use IO::CaptureOutput qw(capture_exec);
# spent 55µs making 1 call to RBM::BEGIN@2.7 # spent 41µs making 1 call to Exporter::import
3(
4 var_p => {
5 # runc100 is true if we are using runc >= 1.0.0
6 # we assume that any version that is not 0.1.1 is >= 1.0.0
7
# spent 832ms (466µs+831) within RBM::__ANON__[(eval 14)[rbm/lib/RBM.pm:39]:10] which was called 15 times, avg 55.4ms/call: # 15 times (466µs+831ms) by RBM::config_p at line 94 of /root/tor-browser-build/rbm/lib/RBM.pm, avg 55.4ms/call
runc100 => sub {
81568µs15831ms my ($out) = capture_exec('sudo', 'runc', '--version');
# spent 831ms making 15 calls to IO::CaptureOutput::capture_exec, avg 55.4ms/call
915542µs1542µs return !($out =~ m/^runc version 0.1.1/);
# spent 42µs making 15 calls to RBM::CORE:match, avg 3µs/call
10 },
11 # runc_spec100 is true if runc spec is at least 1.0.0
12 # We will need to update this when there is a new spec version available
13
# spent 875ms (741µs+874) within RBM::__ANON__[(eval 14)[rbm/lib/RBM.pm:39]:16] which was called 15 times, avg 58.3ms/call: # 15 times (741µs+874ms) by RBM::config_p at line 94 of /root/tor-browser-build/rbm/lib/RBM.pm, avg 58.3ms/call
runc_spec100 => sub {
141572µs15874ms my ($out) = capture_exec('sudo', 'runc', '--version');
# spent 874ms making 15 calls to IO::CaptureOutput::capture_exec, avg 58.2ms/call
1515903µs15333µs return $out =~ m/^.*spec: 1\.[0-9]+\.[0-9]+(?:-dev)?$/m;
# spent 333µs making 15 calls to RBM::CORE:match, avg 22µs/call
16 },
17 nightly_torbrowser_version => sub {
18 state $version = '';
19 return $version if $version;
20 my (undef, undef, undef, $day, $mon, $year) = gmtime;
21 $version = sprintf("tbb-nightly.%u.%02u.%02u", $year + 1900, $mon + 1, $day);
22 return $version;
23 },
24 nightly_torbrowser_incremental_from => sub {
25 my ($project, $options) = @_;
26 my $nightly_dir = project_config($project, 'basedir', $options) . '/nightly';
27 my $current_version = project_config($project, 'var/torbrowser_version', $options);
282130µs257µs
# spent 33µs (10+24) within RBM::BEGIN@28 which was called: # once (10µs+24µs) by RBM::load_config_file at line 28
use Path::Tiny;
# spent 33µs making 1 call to RBM::BEGIN@28 # spent 24µs making 1 call to Exporter::import
29 return [] unless -d $nightly_dir;
30 my @dirs = sort map { $_->basename } path($nightly_dir)->children(qr/^tbb-nightly\./);
31 my $nb_incr = project_config($project, ['var', 'max_torbrowser_incremental_from'], $options);
32 my @res;
33 while ($nb_incr > 0) {
34 my $dir = pop @dirs;
35 last unless $dir;
36 next if $dir eq $current_version;
37 $nb_incr--;
38 push @res, $dir;
39 }
40 return [@res];
41 },
42 },
43)
44112µs
45;